<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    div {
      width: 100px;
      height: 100px;
      background-color: brown;
    }
  </style>
</head>

<body>

  <div></div>
  <button>变化</button>



  <script src="./jquery-3.6.0.js"></script>
  <script>
    $('button').on('click', function () {
      // 先经过1s钟，让元素变为半透明；在经过2s钟，让元素宽度高度都变为200
      $('div')
        .fadeTo(1000, 0.5)   // 让div经过1s变为半透明
        .delay(5000)  // 延迟 5s 
        .animate({ width: '200px', height: '200px' }, 2000) // 经过2s钟，让元素宽度高度都变为200
    })
  </script>
</body>

</html>